﻿using ChurchDiary.BLL;
using ChurchDiary.TableEntity;
using ChurchWebsite.Controllers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace ChurchWebsite.Areas.Settings.Controllers
{
    public class SubMenuController : BaseController
    {
        //
        // GET: /Settings/SubMenu/

        public ActionResult Index()
        {
            return View();
        }
        public JsonResult GetSubMenus()
        {
            return Json(new BLL_Menu().GetSubMenus(),JsonRequestBehavior.AllowGet);
        }
        public JsonResult GetSubMenu(int dataId)
        {
            return Json(new BLL_Menu().GetSubMenu(dataId), JsonRequestBehavior.AllowGet);
        }
        public JsonResult AddSubMenu(EntitySubMenu SubMenu)
        {
            return Json(new BLL_Menu().AddSubMenus(SubMenu), JsonRequestBehavior.AllowGet);
        }
        public JsonResult UpdateSubMenu(EntitySubMenu SubMenu)
        {
            return Json(new BLL_Menu().UpdateSubMenus(SubMenu), JsonRequestBehavior.AllowGet);
        }
        public JsonResult DeleteSubMenu(int dataId)
        {
            return Json(new BLL_Menu().DeleteSubMenus(dataId), JsonRequestBehavior.AllowGet);
        }
        public JsonResult GetMenuCategory()
        {
            return Json(new BLL_Menu().GetMenuCategory(), JsonRequestBehavior.AllowGet);
        }
        public JsonResult GetMainMenu(int dataId)
        {
            return Json(new BLL_Menu().GetMainMenus(dataId), JsonRequestBehavior.AllowGet);
        }
    }
}
